#ifndef WAVY_H
#define WAVY_H

#include <QWidget>
#include "Effects/RGBEffect.h"

#include <math.h>
#include <algorithm>

class Wavy: public RGBEffect
{

public:
    Wavy();
    ~Wavy();

    //EFFECT_REGISTERER(ClassName(), CAT_ADVANCED, [](){return new Wavy;});

    static std::string const ClassName() {return "Wavy";}

    //void DefineExtraOptions(QLayout*)  override;
    void StepEffect(ControllerZone* const controller_zone) override;
    //void LoadCustomSettings(json) override;
    //json SaveCustomSettings(json) override;

private:
    //Ui::Wavy   *ui;
    bool       Dir = true ;
    float      SineProgress      = 10.0f;
    float      WaveProgress      = 60.0f;

    float      WaveFrequency     = 2;
    float      WaveSpeed         = 30;
    float      OscillationSpeed  = 50;

    std::vector<RGBColor>   RandomColors;

    const double PI = std::atan(1)*4;

    RGBColor GetColor(int, int);
    void GenerateRandomColors();

//private slots:
//    void on_wave_freq_slider_valueChanged(int);
//    void on_wave_speed_slider_valueChanged(int);
//    void on_oscillation_speed_slider_valueChanged(int);
};

#endif // WAVY_H
